﻿<UserControl x:Class="SharedCode.Controls.LoadingBar"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Loaded="UserControl_Loaded">
	<UserControl.Resources>
		<!--<Storyboard x:Name="Storyboard1">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" RepeatBehavior="Forever" Storyboard.TargetName="loadImage" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                <EasingDoubleKeyFrame KeyTime="00:00:00.25" Value="45"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.5" Value="90"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.75" Value="135"/>
				<EasingDoubleKeyFrame KeyTime="00:00:01" Value="180"/>
                <EasingDoubleKeyFrame KeyTime="00:00:01.25" Value="225"/>
				<EasingDoubleKeyFrame KeyTime="00:00:01.5" Value="270"/>
                <EasingDoubleKeyFrame KeyTime="00:00:01.75" Value="315"/>
				<EasingDoubleKeyFrame KeyTime="00:00:02" Value="360"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>-->
        <Style TargetType="TextBlock" x:Key="LoadingBarTextBlockStyle">
            <Setter Property="FontSize" Value="13.333"/>
        </Style>
	</UserControl.Resources>
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Border Background="#FFC0F2F1" BorderThickness="3" BorderBrush="#FF2754DD" CornerRadius="6" Opacity="0.8">
            <StackPanel Background="#FFC0F2F1" Orientation="Horizontal" VerticalAlignment="Center">
                <Image Width="60" Height="60" Margin="5" x:Name="loadImage" RenderTransformOrigin="0.5,0.5" Source="/SharedCode;component/Images/glossy-3d-blue-hourglass-icon.png">
                	<Image.RenderTransform>
                		<TransformGroup>
                			<ScaleTransform/>
                			<SkewTransform/>
                			<RotateTransform/>
                			<TranslateTransform/>
                		</TransformGroup>
                	</Image.RenderTransform>
                </Image>
                <StackPanel Orientation="Horizontal" Margin="5,5,10,5" VerticalAlignment="Center" Background="#FFC0F2F1">
                    <TextBlock Text="Подождите, идет " Style="{StaticResource LoadingBarTextBlockStyle}"/>
                    <TextBlock Text="{Binding Action}" Style="{StaticResource LoadingBarTextBlockStyle}"/>
                    <TextBlock Text=" данных" Style="{StaticResource LoadingBarTextBlockStyle}"/>
                </StackPanel>
            </StackPanel>
        </Border>
    </Grid>
</UserControl>
